package com.hanson.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@ContentRowHeight(15)
@HeadRowHeight(30)
public class OrderBean {
    @ExcelIgnore
    private Integer id;

    @ExcelIgnore
    private Integer merId;

    @ExcelIgnore
    private String openId;

    @ColumnWidth(40)
    @ExcelProperty(value = "订单号", index = 0)
    private String orderId;

    @ExcelIgnore
    private Integer goodsId;

    @ColumnWidth(25)
    @ExcelProperty(value = "收货人姓名", index = 10)
    private String userName;

    @ColumnWidth(25)
    @ExcelProperty(value = "收货人电话", index = 11)
    private String userPhone;

    @ColumnWidth(40)
    @ExcelProperty(value = "收货人地址", index = 12)
    private String userAddress;

    @ColumnWidth(25)
    @ExcelProperty(value = "商品数量", index = 5)
    private Integer totalNum;

    @ExcelIgnore
    private Integer totalPrice;

    @ExcelIgnore
    private Integer payPrice;

    @ExcelIgnore
    private Integer status;

    @ExcelIgnore
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    @ExcelIgnore
    private Integer payType;

    @ExcelIgnore
    private String remark;

    @ExcelIgnore
    private Integer orderType;

    @ColumnWidth(25)
    @ExcelProperty(value = "订单类型", index = 2)
    private String orderTypeName;

    @ExcelIgnore
    private String groupNum;

    @ExcelIgnore
    private Integer userScore = 0;

    @ExcelIgnore
    private Integer userMoney = 0;

    @ExcelIgnore
    private Integer userCoupons;

    @ColumnWidth(25)
    @ExcelProperty(value = "下单时间", index = 13)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createDate;

    @ExcelIgnore
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateDate;

    /****/
    @ExcelIgnore
    private Integer addressId;
    @ColumnWidth(25)
    @ExcelProperty(value = "商品规格", index = 8)
    private String goodsAttr;
    @ColumnWidth(25)
    @ExcelProperty(value = "商品名称", index = 3)
    private String goodsName;
    @ColumnWidth(25)
    @ExcelProperty(value = "订单状态", index = 9)
    private String statusName;
    @ExcelIgnore
    private String image;
    @ColumnWidth(25)
    @ExcelProperty(value = "商品单价", index = 4)
    private String webSinglePrice = "0.0";
    @ColumnWidth(25)
    @ExcelProperty(value = "商品总价", index = 6)
    private String webTotalPrice = "0.0";
    @ColumnWidth(25)
    @ExcelProperty(value = "实际支付", index = 7)
    private String webPayPrice = "0.0";
    @ColumnWidth(40)
    @ExcelProperty(value = "下单用户名", index = 1)
    private String nickName;
    @ExcelIgnore
    private String keyWords;
    @ExcelIgnore
    private Date shouldPayDate;
    @ExcelIgnore
    private String courierNo;
}